package com.gnerv.battle.boot.module.dynamic.datasource.service;

import com.baomidou.dynamic.datasource.creator.DataSourceProperty;
import org.springframework.core.io.Resource;

import javax.sql.DataSource;

/**
 * @author Gnerv LiGen
 */
public interface DynamicDatasourceService {

    boolean create(DataSourceProperty dataSourceProperty);

    boolean delete(String code);

    boolean update(DataSourceProperty dataSourceProperty);

    DataSource select(String code);

    boolean initSql(String code, Resource resource);

    boolean inspect(DataSourceProperty dataSourceProperty);
}
